#!/usr/bin/env.python
# _*_ coding:utf-8 _*_
# # # # # # # # # # # # # # # # # # # #
#  题目:        user的url              #
#  姓名:         李吉辉                #
#  时间:    2018年12月9日17:30:37      #
# # # # # # # # # # # # # # # # # # # #

# 定义子应用的所有路由
from django.conf.urls import url

from users import views


# app_name='users'

urlpatterns = [
    # 测试视图和路由的匹配
    # url(正则路由, 视图)
    #  # http://127.0.0.1:8000/users/index/
    # url(r"^index/$", views.index)

    # 子应用的路由全部定义在子路由中
    url(r"^users/index/$", views.index, name="index"),

    # 测试路由的匹配顺序: 路由匹配顺序时自上而下的, (懒匹配)
    # http://127.0.0.1:8000/users/say
    # http://127.0.0.1:8000/users/sayhello
    # url(r'^users/say', views.say),
    # url(r'^users/sayhello', views.say_hello),

    # 注意点: 一般最后加上斜杆最好
    url(r'^users/say/$', views.say),
    url(r'^users/sayhello/$', views.say_hello),
]